package com.lzx.orderserver.service.impl;

import com.lzx.commons.entity.Payment;
import com.lzx.commons.entity.Result;
import com.lzx.orderserver.feign.PaymentFeign;
import com.lzx.orderserver.service.PaymentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaymentServiceImpl implements PaymentsService {
    @Autowired
    private PaymentFeign paymentFeign;
    @Override
    public Result<Payment> getById(int id) {
        return paymentFeign.info(id);
    }

    @Override
    public Result<List<Payment>> list() {
        return paymentFeign.list();
    }

    @Override
    public Result save(Payment payment) {
        return paymentFeign.save(payment);
    }
}
